import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;

/**
 * Created by ospip on 2018/10/10.
 * Copyright (c) 2018 LLAP. All rights reserved.
 */
public class Main extends JFrame {
    public Main() {
        super("Test");
        try {
            UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (Exception e) {
            try {
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            } catch (Exception exc) {
                System.out.println("Substance Raven Graphite failed to initialize");
            }
        }

//        LAF skin = new SpringLAF();
        LAF skin = new SummerLAF();

        this.setSize(400, 150);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        JPanel panel = new JPanel(new GridLayout(2, 3, 15, 0));
        panel.setBorder(new EmptyBorder(10, 10, 10, 10));

        Button button = skin.createButton("1");
        TextBox textBox = skin.createTextBox();
        ComboBox comboBox = skin.createComboBox();

        comboBox.add("111");
        comboBox.add("222");
        comboBox.add("333");

        panel.add(button);
        panel.add(textBox);
        panel.add(comboBox);
        this.add(panel);
    }

    public static void main(String[] args) {
        new Main().setVisible(true);
    }
}